

// =================================================================== 
// Module说明
//====================================================================
// 创建时间：2017-09-25 11:09:51
// 负责人：Sushee
// ===================================================================

using System;
using System.ComponentModel;
using System.Text;

namespace OF.Utility.Logging
{
    #region ActionLog数据实体
    /// <summary>
    ///行为日志数据实体  
    /// </summary>
    [Serializable]
    public class ActionLog : BaseLog
    {

        #region 公共属性

        ///<summary>
        ///主键
        ///</summary>
        [Description("主键")]
        public long ActionLogID
        {
            get; set;
        }

        #endregion

        public ActionLog()
        {
            CreatedDate = DateTime.Now;
        }

        public override string ToString()
        {
            StringBuilder sb = new StringBuilder("详情：");
            sb.AppendLine("RequestMethod：" + this.RequestMethod);
            if (!string.IsNullOrEmpty(this.RequestUrl))
            {
                sb.AppendLine("RequestUrl：" + this.RequestUrl);
            }
            if (!string.IsNullOrEmpty(this.APPVersion))
            {
                sb.AppendLine("APPVersion：" + this.APPVersion);
            }
            if (this.Platform > 0)
            {
                sb.AppendLine("Platform：" + this.Platform);
            }
            if (!string.IsNullOrEmpty(this.PlatformVersion))
            {
                sb.AppendLine("PlatformVersion：" + this.PlatformVersion);
            }
            sb.AppendLine("UserID：" + this.UserID);
            if (!string.IsNullOrEmpty(this.PostData))
            {
                sb.AppendLine("PostData：" + this.PostData);
            }           
            if (!string.IsNullOrEmpty(this.UA))
            {
                sb.AppendLine("UA：" + this.UA);
            }
            if (!string.IsNullOrEmpty(this.Vendor))
            {
                sb.AppendLine("Vendor：" + this.Vendor);
            }
            if (!string.IsNullOrEmpty(this.Model))
            {
                sb.AppendLine("Model：" + this.Model);
            }
            if (!string.IsNullOrEmpty(this.Token))
            {
                sb.AppendLine("Token：" + this.Token);
            }
            if (!string.IsNullOrEmpty(this.ClientId))
            {
                sb.AppendLine("ClientId：" + this.ClientId);
            }
            if (!string.IsNullOrEmpty(this.Moble))
            {
                sb.AppendLine("Moble：" + this.Moble);
            }
            if (!string.IsNullOrEmpty(this.Imei))
            {
                sb.AppendLine("Imei：" + this.Imei);
            }
            if (!string.IsNullOrEmpty(this.Uuid))
            {
                sb.AppendLine("Uuid：" + this.Uuid);
            }
            if (!string.IsNullOrEmpty(this.Imei))
            {
                sb.AppendLine("Imei：" + this.Imei);
            }
            sb.AppendLine("CreatedDate：" + this.CreatedDate.ToString("yyyy-MM-dd HH:mm:ss"));
            if (!string.IsNullOrEmpty(this.ClientIP))
            {
                sb.AppendLine("ClientIP：" + this.ClientIP);
            }

            return sb.ToString();
        }

    }
    #endregion
}